package com.zhuoyian.dl.manager;

import android.util.SparseArray;

import com.zhuoyian.dl.service.DownloadPresent;

public class DownloadManager {
	private static SparseArray<DownloadPresent> presents = new SparseArray<DownloadPresent>();

	public static void removePresent(int taskId) {
		DownloadPresent present = presents.get(taskId);
		if (present != null) {
			present.cancel();
		}
		presents.remove(taskId);
	}

	public static void addPresent(DownloadPresent p) {
		if (p != null) {
			presents.put(p.getTaskId(), p);
		}
	}
	
	
}
